﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.HomeProfileAdmin" %>
<owc:OwGrid ID="HomeProfiledv" runat="server" SkinID="OwGridAdmin" 
    DataSourceID="HomeProfileOds" AllowCustomPaging="True" AllowPaging="True"
    AutoGenerateColumns="False" OwEnableMessageDisplay="True"
    OwMessageDisplayType="InPlace">
    <MasterTableView DataSourceID="HomeProfileOds" DataKeyNames="OpenHomeProfileID" AllowCustomPaging="true" AllowPaging="true">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("OpenHomeProfileID")%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <owc:OwR ID="GenderOwR" runat="server" OwText="Gender" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#(OwEnum.Genders)Eval("GenderID").OwToInt64TryParseReturn0()%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DateOfBirthOwR" runat="server" OwText="BirthDay" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("DateOfBirth").OwToDateTimePublishDate()%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="ThemeOwR" runat="server" OwText="Theme" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("Theme") %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="LayOutOwR" runat="server" OwText="LayOut" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("LayOut")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="TimeZoneOwR" runat="server" OwText="TimeZone" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("TimeZone")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:CommandLabel %>'>
                <ItemTemplate>
                    <table width="100%">
                        <tr>
                            <td>
                                <owc:OwR ID="DefaultHomeProfileOwR" runat="server" OwText="DefaultHomeProfile" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <%# Eval("DefaultOpenHomeProfileDetailID")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="IsDeletedOwR" runat="server" OwText="IsDeleted" OwSuffix=":"></owc:OwR>
                            </td>
                            <td>
                                <owc:OwCheckBox ID="IsDeletedCbb" runat="server" Checked='<%#Eval("IsDeleted")%>'
                                    AutoPostBack="true" CssClass="HiddenText" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn UniqueName="TemplateColumn" HeaderStyle-Width="120">
                <EditItemTemplate>
                    <asp:LinkButton ID="Updatelb" runat="server" CommandName="Update" Text="<%$ OwR: Update %>"></asp:LinkButton>
                    &nbsp;<asp:LinkButton ID="Cancellb" runat="server" CausesValidation="false" CommandName="Cancel"
                        Text="<%$ OwR: Cancel %>"></asp:LinkButton>
                </EditItemTemplate>
                <ItemTemplate>
                    <owc:OwButton ID="OwConfirmEdit" runat="server" CausesValidation="false" Text="<%$ OwR: Edit %>"
                        CommandName="Edit">
                    </owc:OwButton>
                    <owc:OwConfirmButton ID="OwConfirmDelete" runat="server" Text="<%$ OwR: Delete %>"
                        CommandName="Delete">
                    </owc:OwConfirmButton>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template" PopUpSettings-ScrollBars="Vertical" PopUpSettings-Modal="true">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <table style="width: 800px">
                    <tr>
                        <td align="left">
                            <owc:OwR ID="GenderOwR" runat="server" OwText="Gender" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwComboBox ID="GenderCbb" runat="server" SelectedValue='<%#Bind("GenderID") %>'
                                OnInit="GenderCbb_Init">
                            </owc:OwComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <owc:OwR ID="DateOfBirthOwR" runat="server" OwText="DateOfBirth" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwDateTimePicker ID="DateOfBirth" runat="server" Culture="en-US" Skin="Office2007">
                                <TimeView CellSpacing="-1">
                                </TimeView>
                                <TimePopupButton ImageUrl="" HoverImageUrl=""></TimePopupButton>
                                <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"
                                    Skin="Office2007">
                                </Calendar>
                                <DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy">
                                </DateInput>
                                <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                            </owc:OwDateTimePicker>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <owc:OwR ID="ThemeOwR" runat="server" OwText="Theme" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwTextBox SkinID="owTextBox" ID="Themetxt" runat="server" Width="680px" OwDefaultValue=""
                                OwUsedForEdit="False" Text='<%# Bind("Theme") %>' LabelWidth="">
                            </owc:OwTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <owc:OwR ID="LayOutOwR" runat="server" OwText="LayOut" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwTextBox SkinID="owTextBox" ID="Titletxt" runat="server" Width="680px" OwDefaultValue=""
                                OwUsedForEdit="False" Text='<%# Bind("LayOut") %>' LabelWidth="">
                            </owc:OwTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <owc:OwR ID="TimeZoneOwR" runat="server" OwText="TimeZone" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwTextBox SkinID="owTextBox" ID="TimeZonetxt" runat="server" Width="680px" OwDefaultValue=""
                                OwUsedForEdit="False" Text='<%# Bind("TimeZone") %>' LabelWidth="">
                            </owc:OwTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <owc:OwR ID="DefaultHomeProfileDetailOwR" runat="server" OwText="DefaultHomeProfileDetail"
                                OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwComboBox SkinID="owCombobox" ID="DefaultHomeProfileDetailCbb" runat="server" EmptyMessage="Empty"
                                SelectedValue='<%# Bind("DefaultOpenHomeProfileDetailID") %>' DataSourceID="HomeProfileDetailOds"
                                DataTextField="Title" DataValueField="OpenHomeProfileDetailID">
                            </owc:OwComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <owc:OwR ID="IsDeletedOwR" runat="server" OwText="IsDeleted" OwSuffix=":"></owc:OwR>
                        </td>
                        <td align="left">
                            <owc:OwCheckBox runat="server" ID="isDeletedCbb" Text="<%$ OwR:IsDeleted %>" Checked='<%# Bind("IsDeleted") %>' />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <owc:OwConfirmButton ID="btnUpdate" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' />
                            <owc:OwConfirmButton ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text='<%$ OwR:Cancel %>' />
                        </td>
                    </tr>
                </table>
            </FormTemplate>
            <PopUpSettings ScrollBars="Vertical" Modal="True"></PopUpSettings>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="HomeProfileOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfilesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfilesBLL"
    UpdateMethod="OwUpdate" EnablePaging="true" SelectCountMethod="OwGetByDynamicCount">
    <SelectParameters>
        <asp:Parameter DbType="Guid" Name="userID" />
        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="False" />
        <asp:Parameter Name="genderID" Type="Int64" />
        <asp:Parameter Name="defaultOpenHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
<owc:OwObjectDataSource ID="HomeProfileDetailOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileDetailsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileDetailsBLL"
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="False" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="openHomeProfileID" Type="Int64" />
        <asp:Parameter Name="firstNameID" Type="Int64" />
        <asp:Parameter Name="lastNameID" Type="Int64" />
        <asp:Parameter Name="isDefault" Type="Boolean" />
        <asp:Parameter Name="twelveYearCycleOfAnimalID" Type="Int32" />
        <asp:Parameter Name="fiveElementID" Type="Int32" />
        <asp:Parameter Name="hometownContinentID" Type="Int64" />
        <asp:Parameter Name="hometownCountryID" Type="Int64" />
        <asp:Parameter Name="hometownProvinceID" Type="Int64" />
        <asp:Parameter Name="hometownDistrictID" Type="Int64" />
        <asp:Parameter Name="hometownWardID" Type="Int64" />
        <asp:Parameter Name="zodiacID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
